select значение
    case значение1
       выражение1
end

Описание:

Позволяет построить структуру выбора вместо множественных структур if.

Пример:

local fighter=rand(1, 10)

select fighter
    case 1
       print("You are warrior! Show them your berserker fury!")

    case 2
       print("You are mage! Freeze your enemies, burn them down and throw fireballs in all directions!")

    case 3
       print("You are archer! Shoot your enemies on far distance!")

   case 4, 5
       print("Knight and assassin will be available on 'nightmare' difficulty level!")

    else
       print("More characters will be available in upcoming expansion pack!")
end select